package org.assistant.csp.data;

import java.sql.Date;

/**
 * 用户的会话信息，存放于Session中
 * 
 * @author zhangQiong 2008-10-15
 * 
 */
public class UserSession {
	private String id;// 用户ID，用于唯一标识一个用户
	private String loginAccount;// 登录账号
	private String name;// 用户名称
	private long roleId;// 角色ID
	private String roleName;// 角色名称
	private String homeId;// 所属家庭ID
	private String homeName;// 家庭名称
	private String email;// email
	private Date latestLonginTime;// 最后一次登录时间
	private String latestLonginIp;// 最后一次登录的IP

	/**
	 * 缓存，用户登录时从数据库中载入缓存信息<br>
	 * 缓存的内容：1.当前用户的所有账户(现金账户、银行账户、债权债务账户等)信息。
	 */
	private CacheInSession cacheInSession;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLoginAccount() {
		return loginAccount;
	}

	public void setLoginAccount(String loginAccount) {
		this.loginAccount = loginAccount;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getRoleId() {
		return roleId;
	}

	public void setRoleId(long roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getHomeId() {
		return homeId;
	}

	public void setHomeId(String homeId) {
		this.homeId = homeId;
	}

	public String getHomeName() {
		return homeName;
	}

	public void setHomeName(String homeName) {
		this.homeName = homeName;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Date getLatestLonginTime() {
		return latestLonginTime;
	}

	public void setLatestLonginTime(Date latestLonginTime) {
		this.latestLonginTime = latestLonginTime;
	}

	public String getLatestLonginIp() {
		return latestLonginIp;
	}

	public void setLatestLonginIp(String latestLonginIp) {
		this.latestLonginIp = latestLonginIp;
	}

	public CacheInSession getCacheInSession() {
		return cacheInSession;
	}

	public void setCacheInSession(CacheInSession cacheInSession) {
		this.cacheInSession = cacheInSession;
	}
}
